Integrand size = 21, antiderivative size = 67 \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {b d n}{x}-\frac {b e n x^{-1+r}}{(1-r)^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e x^{-1+r} \left (a+b \log \left (c x^n\right )\right )}{1-r} \]
Time = 0.07 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00 \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {a (-1+r) \left (d (-1+r)-e x^r\right )+b n \left (d (-1+r)^2+e x^r\right )+b (-1+r) \left (d (-1+r)-e x^r\right ) \log \left (c x^n\right )}{(-1+r)^2 x} \]
-((a*(-1 + r)*(d*(-1 + r) - e*x^r) + b*n*(d*(-1 + r)^2 + e*x^r) + b*(-1 + r)*(d*(-1 + r) - e*x^r)*Log[c*x^n])/((-1 + r)^2*x))
Time = 0.29 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.18, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2772, 25, 27, 802, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx\) |
\(\Big \downarrow \) 2772 |
\(\displaystyle -b n \int -\frac {e x^r+d (1-r)}{(1-r) x^2}dx-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e x^{r-1} \left (a+b \log \left (c x^n\right )\right )}{1-r}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle b n \int \frac {e x^r+d (1-r)}{(1-r) x^2}dx-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e x^{r-1} \left (a+b \log \left (c x^n\right )\right )}{1-r}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b n \int \frac {e x^r+d (1-r)}{x^2}dx}{1-r}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e x^{r-1} \left (a+b \log \left (c x^n\right )\right )}{1-r}\) |
\(\Big \downarrow \) 802 |
\(\displaystyle \frac {b n \int \left (e x^{r-2}+\frac {d-d r}{x^2}\right )dx}{1-r}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e x^{r-1} \left (a+b \log \left (c x^n\right )\right )}{1-r}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e x^{r-1} \left (a+b \log \left (c x^n\right )\right )}{1-r}+\frac {b n \left (-\frac {d (1-r)}{x}-\frac {e x^{r-1}}{1-r}\right )}{1-r}\) |
(b*n*(-((d*(1 - r))/x) - (e*x^(-1 + r))/(1 - r)))/(1 - r) - (d*(a + b*Log[ c*x^n]))/x - (e*x^(-1 + r)*(a + b*Log[c*x^n]))/(1 - r)
3.4.76.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[Exp andIntegrand[(c*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ .))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + b*Log[c*x^n]) u, x] - Simp[b*n Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] && !(EqQ[q , 1] && EqQ[m, -1])
Time = 0.21 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.90
method | result | size |
parallelrisch | \(-\frac {-x^{r} \ln \left (c \,x^{n}\right ) b e r +\ln \left (c \,x^{n}\right ) b d \,r^{2}+b d n \,r^{2}+x^{r} \ln \left (c \,x^{n}\right ) b e -x^{r} a e r +x^{r} b e n -2 \ln \left (c \,x^{n}\right ) b d r +a d \,r^{2}-2 b d n r +x^{r} a e +b \ln \left (c \,x^{n}\right ) d -2 a d r +b d n +a d}{x \left (r^{2}-2 r +1\right )}\) | \(127\) |
risch | \(-\frac {b \left (d r -e \,x^{r}-d \right ) \ln \left (x^{n}\right )}{\left (-1+r \right ) x}-\frac {2 x^{r} a e +2 b d n +2 a d -2 x^{r} a e r +2 x^{r} b e n +i \pi b d \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,r^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,r^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-4 a d r +2 b d n \,r^{2}-2 \ln \left (c \right ) b e \,x^{r} r +i \pi b e \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) x^{r} r +2 d b \ln \left (c \right )-i \pi b d \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-4 b d n r +2 \ln \left (c \right ) b e \,x^{r}+2 \ln \left (c \right ) b d \,r^{2}-4 \ln \left (c \right ) b d r -i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+2 a d \,r^{2}+i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b e \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{r} r -i \pi b e \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) x^{r}-i \pi b e \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{r} r -i \pi b d \,r^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+2 i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) r +i \pi b e \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{r}+i \pi b e \operatorname {csgn}\left (i c \,x^{n}\right )^{3} x^{r} r -2 i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} r +i \pi b e \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{r}-2 i \pi b d \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} r -i \pi b d \,r^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-i \pi b e \operatorname {csgn}\left (i c \,x^{n}\right )^{3} x^{r}+2 i \pi b d \operatorname {csgn}\left (i c \,x^{n}\right )^{3} r}{2 \left (-1+r \right )^{2} x}\) | \(614\) |
-(-x^r*ln(c*x^n)*b*e*r+ln(c*x^n)*b*d*r^2+b*d*n*r^2+x^r*ln(c*x^n)*b*e-x^r*a *e*r+x^r*b*e*n-2*ln(c*x^n)*b*d*r+a*d*r^2-2*b*d*n*r+x^r*a*e+b*ln(c*x^n)*d-2 *a*d*r+b*d*n+a*d)/x/(r^2-2*r+1)
Leaf count of result is larger than twice the leaf count of optimal. 130 vs. \(2 (62) = 124\).
Time = 0.29 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.94 \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {b d n + {\left (b d n + a d\right )} r^{2} + a d - 2 \, {\left (b d n + a d\right )} r + {\left (b e n - a e r + a e - {\left (b e r - b e\right )} \log \left (c\right ) - {\left (b e n r - b e n\right )} \log \left (x\right )\right )} x^{r} + {\left (b d r^{2} - 2 \, b d r + b d\right )} \log \left (c\right ) + {\left (b d n r^{2} - 2 \, b d n r + b d n\right )} \log \left (x\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} \]
-(b*d*n + (b*d*n + a*d)*r^2 + a*d - 2*(b*d*n + a*d)*r + (b*e*n - a*e*r + a *e - (b*e*r - b*e)*log(c) - (b*e*n*r - b*e*n)*log(x))*x^r + (b*d*r^2 - 2*b *d*r + b*d)*log(c) + (b*d*n*r^2 - 2*b*d*n*r + b*d*n)*log(x))/((r^2 - 2*r + 1)*x)
Leaf count of result is larger than twice the leaf count of optimal. 348 vs. \(2 (56) = 112\).
Time = 2.18 (sec) , antiderivative size = 348, normalized size of antiderivative = 5.19 \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\begin {cases} - \frac {a d r^{2}}{r^{2} x - 2 r x + x} + \frac {2 a d r}{r^{2} x - 2 r x + x} - \frac {a d}{r^{2} x - 2 r x + x} + \frac {a e r x^{r}}{r^{2} x - 2 r x + x} - \frac {a e x^{r}}{r^{2} x - 2 r x + x} - \frac {b d n r^{2}}{r^{2} x - 2 r x + x} + \frac {2 b d n r}{r^{2} x - 2 r x + x} - \frac {b d n}{r^{2} x - 2 r x + x} - \frac {b d r^{2} \log {\left (c x^{n} \right )}}{r^{2} x - 2 r x + x} + \frac {2 b d r \log {\left (c x^{n} \right )}}{r^{2} x - 2 r x + x} - \frac {b d \log {\left (c x^{n} \right )}}{r^{2} x - 2 r x + x} - \frac {b e n x^{r}}{r^{2} x - 2 r x + x} + \frac {b e r x^{r} \log {\left (c x^{n} \right )}}{r^{2} x - 2 r x + x} - \frac {b e x^{r} \log {\left (c x^{n} \right )}}{r^{2} x - 2 r x + x} & \text {for}\: r \neq 1 \\- \frac {a d}{x} + a e \log {\left (x \right )} + b d \left (- \frac {n}{x} - \frac {\log {\left (c x^{n} \right )}}{x}\right ) - b e \left (\begin {cases} - \log {\left (c \right )} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases}\right ) & \text {otherwise} \end {cases} \]
Piecewise((-a*d*r**2/(r**2*x - 2*r*x + x) + 2*a*d*r/(r**2*x - 2*r*x + x) - a*d/(r**2*x - 2*r*x + x) + a*e*r*x**r/(r**2*x - 2*r*x + x) - a*e*x**r/(r* *2*x - 2*r*x + x) - b*d*n*r**2/(r**2*x - 2*r*x + x) + 2*b*d*n*r/(r**2*x - 2*r*x + x) - b*d*n/(r**2*x - 2*r*x + x) - b*d*r**2*log(c*x**n)/(r**2*x - 2 *r*x + x) + 2*b*d*r*log(c*x**n)/(r**2*x - 2*r*x + x) - b*d*log(c*x**n)/(r* *2*x - 2*r*x + x) - b*e*n*x**r/(r**2*x - 2*r*x + x) + b*e*r*x**r*log(c*x** n)/(r**2*x - 2*r*x + x) - b*e*x**r*log(c*x**n)/(r**2*x - 2*r*x + x), Ne(r, 1)), (-a*d/x + a*e*log(x) + b*d*(-n/x - log(c*x**n)/x) - b*e*Piecewise((- log(c)*log(x), Eq(n, 0)), (-log(c*x**n)**2/(2*n), True)), True))
Exception generated. \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(r-2>0)', see `assume?` for more details)Is
Leaf count of result is larger than twice the leaf count of optimal. 186 vs. \(2 (62) = 124\).
Time = 0.38 (sec) , antiderivative size = 186, normalized size of antiderivative = 2.78 \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\frac {b e n r x^{r} \log \left (x\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} + \frac {b e r x^{r} \log \left (c\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac {b d n \log \left (x\right )}{x} - \frac {b e n x^{r} \log \left (x\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac {b d n}{x} - \frac {b e n x^{r}}{{\left (r^{2} - 2 \, r + 1\right )} x} + \frac {a e r x^{r}}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac {b d \log \left (c\right )}{x} - \frac {b e x^{r} \log \left (c\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac {a d}{x} - \frac {a e x^{r}}{{\left (r^{2} - 2 \, r + 1\right )} x} \]
b*e*n*r*x^r*log(x)/((r^2 - 2*r + 1)*x) + b*e*r*x^r*log(c)/((r^2 - 2*r + 1) *x) - b*d*n*log(x)/x - b*e*n*x^r*log(x)/((r^2 - 2*r + 1)*x) - b*d*n/x - b* e*n*x^r/((r^2 - 2*r + 1)*x) + a*e*r*x^r/((r^2 - 2*r + 1)*x) - b*d*log(c)/x - b*e*x^r*log(c)/((r^2 - 2*r + 1)*x) - a*d/x - a*e*x^r/((r^2 - 2*r + 1)*x )
Timed out. \[ \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\int \frac {\left (d+e\,x^r\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \]